package com.proyecto.track.bo;


import java.util.Date;
import javax.persistence.*;


@Entity
public class Coment {
	private Long id;
	private String description;
	private Date commentDay;
	private Task task;
	private UserPerson userPerson;
	
	public Coment(){
		this.commentDay = new Date();
	}
	
	public Coment(String description, Date commentDay){
		this.description = description;
		this.commentDay = commentDay;
	}
	
	
	@ManyToOne(fetch = FetchType.LAZY)
	public UserPerson getUserPerson() {
		return userPerson;
	}

	public void setUserPerson(UserPerson userPerson) {
		this.userPerson = userPerson;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public Task getTask() {
		return task;
	}

	public void setTask(Task task) {
		this.task = task;
	}

	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getCommentDay() {
		return commentDay;
	}

	public void setCommentDay(Date commentDay) {
		this.commentDay = commentDay;
	}
	
}
